<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<%@taglib prefix="s" uri="/struts-tags" %>

<%@page import="java.util.Enumeration"%>
<%@page import="java.util.List"%>
<html>
<head>


</head>
<body>

<script type="text/javascript">

function preencheCamposDinamicamente() {

	var preenchedorIframe = document.getElementById('preenchedor').contentWindow.document;
	if ('<s:property value="resourceId" />' != '') {
		preenchedorIframe.getElementById('resourceId').value = '<s:property value="resourceId" />';
	}

	var field = '';
	var val = '';
	
	<s:iterator id="resultIterator" value="results">
		field = '<s:property value="[0].substring(0, [0].indexOf(':'))" />';
		val = escape('<s:property value="[0].substring([0].indexOf(':') + 1)" />');

		
		if (preenchedorIframe.getElementsByName(field)[0] != null)
			preenchedorIframe.getElementsByName(field)[0].value = unescape(val);
	
	</s:iterator>
	
}
</script>

<iframe id="preenchedor" name="preenchedor" src="/sobi/nodecorate/createMarc.html" style="width:600px; height:500px; border: 0px" onload="preencheCamposDinamicamente();">
	Falha ao carregar o frame.
</iframe>



</body>
</html>